Introduction to AWS Systems Manager
AWS Systems Manager (SSM) is a comprehensive management service designed to streamline operations across your cloud and hybrid infrastructure.
AWS Systems Manager (SSM) is a secure, end-to-end management solution for AWS Cloud and hybrid cloud environments. It provides a centralized and consistent way to gather operational insights and perform routine management tasks across multiple AWS services, simplifying configuration management, patching, and automation tasks. (source_page: 1, 4)
AWS Systems Manager (SSM) is a comprehensive management service designed to streamline operations across your cloud and hybrid infrastructure.
Before an EC2 instance or hybrid resource can be managed by AWS Systems Manager, certain prerequisites must be met to ensure proper communication and security.
AWS Systems Manager offers a suite of capabilities to manage, automate, and secure your compute infrastructure.
These are the main features provided by Systems Manager for managing applications and infrastructure across AWS and hybrid environments.
AWS Systems Manager Patch Manager automates the patching of operating systems, security updates, and applications across your hybrid environments.
Manual patching of servers is labor-intensive and error-prone, leading to vulnerabilities. Patch Manager provides a robust solution to automate this process across AWS, on-premises, and other cloud VMs. Its primary goal is a uniform, automated, and consistent patching process across all regions and environments.
AWS Systems Manager extends its management capabilities beyond AWS Cloud to encompass on-premise servers and virtual machines in other cloud providers, offering a centralized management console for diverse compute nodes.
To configure AWS Systems Manager for managing resources in a hybrid environment, several crucial steps are involved, from IAM setup to agent installation and advanced settings.
π‘ For on-premise or other cloud VMs, a non-IAM user with programmatic access is required, unlike EC2 instances which use IAM roles. Access keys and secret access keys are generated and must be securely stored.
π‘ To register hybrid resources (on-premise VMs, other cloud VMs) with Systems Manager.
π‘ The SSM Agent must be installed on the on-premise VMs or VMs in other cloud providers.
powershell & "C:\Program Files\Amazon\SSM\amazonaws.com" /register-instance --register-with-amazon --region "us-east-1" --private-key "C:\Program Files\Amazon\SSM\etc\amazon-ssm-agent.pem" --activation-key "YOUR_ACTIVATION_CODE" --expected-container-path "C:\Program Files\Amazon\SSM" --installer-type "msi" --target-instance-id "i-0123456789abcdef0" (Note: Actual command in demo involved downloading and then registering with activation code/ID. Key Parameters: -region, -activation-code, -activation-id)
π‘ To prevent traffic from going to the public internet when connecting to AWS services, routing traffic through the AWS backbone network.
π‘ To automatically rotate the private keys used by the SSM agent.
π‘ Required to use Session Manager with on-premise instances.
This demonstration outlines the step-by-step process to integrate a Linux EC2 instance with AWS Systems Manager, ensuring it appears as a managed node.
π‘ To view running instances and confirm if the SSM agent is pre-installed or its version.
sudo cat /etc/amazon/ssm/agent_version (or similar command for specific Linux distributions as per AWS documentation) or sudo systemctl status amazon-ssm-agent
π‘ The SSM Agent needs permissions to communicate with the Systems Manager service, adhering to AWSβs zero-trust policy.
π‘ Security groups act as instance-level firewalls. Outbound connections to the SSM service must be explicitly allowed.
π‘ To confirm that the SSM Agent is successfully communicating with the Systems Manager service and the instance is recognized as a managed node.
π‘ To enable SSM management for instances that do not come with the agent pre-installed.
AWS Systems Manager Run Command provides a scalable solution for deploying and managing the Amazon CloudWatch Agent across multiple EC2 instances, streamlining the collection of custom metrics and logs.
π‘ To remotely install the CloudWatch Agent package on the target EC2 instance(s) in a scalable manner.
AWS Systems Manager -> Run Command -> Select Command Document: AWS-ConfigureAWSPackage -> Action: Install -> Installation Type: Uninstall and reinstall -> Package Name: AmazonCloudWatchAgent -> Version: latest -> Target Selection: Choose instances manually (select Windows EC2 instance).
π‘ To define which metrics and logs the CloudWatch Agent should collect and to store this configuration securely.
π‘ To activate the CloudWatch Agent with the new configuration, sending metrics and logs to CloudWatch.
AWS Systems Manager -> Run Command -> Select Command Document: AmazonCloudWatch-ManageAgent -> Action: Configure -> Mode: EC2 -> Optional Configuration Location: Parameter store name (e.g., AmazonCloudWatchWindows) -> Optional Restart: Yes -> Target Selection: Choose instances manually (select Windows EC2 instance).